AwaitingQuestionPortlet = Class.extend({
	init: function()	{
		this.name = "AwaitingQuestionPortlet";
	},
	
	run: function()	{
		var obj = this;
		this.onAjax('question', 'get-answerless-question', {}, 'GET', {
			'onSuccess': function(ret)	{
				for (var i=0;i<ret.length;i++)	{
					var row = ret[i];
					obj.getPortletPlaceholder().drawToCanvas('<div><a href="/index.html#page/Question/qid/'+row.id+'">'+row.title+'</a><span style="float: right">'+row.created_date+'</span></div>');
				}
			}
		});
	}
}).implement(PortletInterface).implement(AjaxInterface).implement(RenderInterface);